% Copyright (C) 2014-19 Benjamin Born and Johannes Pfeifer 
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This code is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% For a copy of the licencse,
% see <http://www.gnu.org/licenses/>.

bottomstring_descriptives_g={'    \bottomrule'
'    \end{tabular}'
'\caption*{\footnotesize{\emph{Notes:} Government consumption is consumption of the general government except for Chile, El Salvador, Malaysia, Mexico, Peru, and Sweden, where it refers to central government consumption. The government consumption-to-GDP ratio is computed as the ratio of nominal variables, except for Uruguay, where we compute it as the ratio of real variables. The ratio is measured in percentage points. For Mexico, the share of central government wages and goods and services purchases is only a very small share of GDP.}}'
'  \label{tab:descriptives_g}'
'\end{table}'};

for ii=1:size(bottomstring_descriptives_g,1)
fprintf(fid_g,'%-150s \n',bottomstring_descriptives_g{ii,1});
end

bottomstring_descriptives_spread={'    \bottomrule'
'    \end{tabular}'
'\caption*{\footnotesize{\emph{Notes:} Default premium $s_t$ is end-of-quarter observation, measured in percentage points. The last two columns report the correlation of default premiums with the growth rates of real GDP, $\Delta y_t$, and government consumption, $\Delta g_t$, respectively. Following \citet[][Tables B to D]{IMF2015}, group entry ``D'''' denotes developed economies, while ``E'''' denotes emerging economies. Excludes default episodes in Argentina (2001Q4--2005Q2,2014Q3--2016Q2), Ecuador (1999Q3--2000Q3 and 2008Q4--2009Q2), and Greece (2012Q1--2012Q2, 2012Q4) as classified by Standard \& Poor''s \citep[see][Table 13]{SandP2018}.}}'
'  \label{tab:descriptives_spread}'
'\end{table}'};

for ii=1:size(bottomstring_descriptives_spread,1)
fprintf(fid_spread,'%-150s \n',bottomstring_descriptives_spread{ii,1});
end

fclose(fid_spread);
fclose(fid_g);
